package com.lyj.io.module.sys.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 菜单
 * @author: 李亚杰
 * @version: 1.0
 * @date: 2021/8/19 14:53
 */
@ApiModel("菜单表")
@Data
@TableName("sys_menu")
public class SysMenu implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 菜单id
     */
    @ApiModelProperty(value = "菜单id", example = "")
    @TableId(type = IdType.ASSIGN_ID)
    private String menuId;

    /**
     * 菜单类型
     */
    @ApiModelProperty(value = "菜单类型", example = "")
    private Integer menuType;

    /**
     * 菜单名称
     */
    @ApiModelProperty(value = "菜单名称", example = "")
    private String menuName;

    /**
     * 菜单url
     */
    @ApiModelProperty(value = "菜单url", example = "")
    private String menuUrl;

    /**
     * 菜单图标
     */
    @ApiModelProperty(value = "菜单图标", example = "")
    private String menuIcon;
    /**
     * 菜单图标颜色
     */
    @ApiModelProperty(value = "菜单图标颜色", example = "")
    private String menuIconColor;
    /**
     * 父级菜单id
     */
    @ApiModelProperty(value = "父级菜单id", example = "")
    private String parentMenuId;
    /**
     * 提示
     */
    @ApiModelProperty(value = "提示", example = "")
    private String tip;

    /**
     * 是否隐藏
     */
    @ApiModelProperty(value = "是否隐藏", example = "")
    private Integer hidden;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人", example = "")
    private Long creater;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", example = "")
    @TableField(value = "CREATE_DATE", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date createDate;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间", example = "")
    @TableField(value = "UPDATE_DATE", fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date updateDate;

    /**
     * 删除标识
     */
    @ApiModelProperty(value = "删除标识,默认是0", example = "")
    private String deleteFlag;

    /**
     * 是否授权
     */
    @ApiModelProperty(value = "是否授权", example = "")
    @TableField(exist = false)
    private boolean selected;

    /**
     * 子菜单
     */
    @ApiModelProperty(value = "子菜单", example = "")
    @TableField(exist = false)
    private List<?> children;
}
